﻿''' <summary>
''' 选项
''' </summary>
''' <remarks></remarks>
<Serializable()> Public Class PubOption

    '地形选项------------------------------------------------------------

    ''' <summary>
    ''' 简单地形
    ''' </summary>
    ''' <remarks></remarks>
    Private m_SimTerrain As String = "N" '简单地形
    ''' <summary>
    ''' 复杂地形
    ''' </summary>
    ''' <remarks></remarks>
    Private m_ComTerrain As String = "N" '复杂地形
    ''' <summary>
    ''' 综合地形
    ''' </summary>
    ''' <remarks></remarks>
    Private m_ComSimTerrain As String = "N" '综合地形
    ''' <summary>
    ''' 是不考复杂地形
    ''' </summary>
    ''' <remarks></remarks>
    Private m_YNterrain As String = "N" '是不考复杂地形

    ''' <summary>
    ''' 简单地形
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property SimTerrain() As String
        Get
            Return m_SimTerrain
        End Get
        Set(ByVal value As String)
            m_SimTerrain = value
        End Set
    End Property
    ''' <summary>
    ''' 复杂地形
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property ComTerrain() As String
        Get
            Return m_ComTerrain
        End Get
        Set(ByVal value As String)
            m_ComTerrain = value
        End Set
    End Property
    ''' <summary>
    ''' 综合地形
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property ComSimTerrain() As String
        Get
            Return m_ComSimTerrain
        End Get
        Set(ByVal value As String)
            m_ComSimTerrain = value
        End Set
    End Property
    ''' <summary>
    ''' 是否考虑复杂地形
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property YNterrain() As String
        Get
            Return m_YNterrain
        End Get
        Set(ByVal value As String)
            m_YNterrain = value
        End Set
    End Property


    '简单地形-------------------------------------------------
    ''' <summary>
    ''' 简单地形选项
    ''' </summary>
    ''' <remarks></remarks>
    Private m_SimpleTerrain As String = "N" '简单地形选项
    ''' <summary>
    ''' 简单地形选项
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property SimpleTerrain() As String
        Get
            Return m_SimpleTerrain
        End Get
        Set(ByVal value As String)
            m_SimpleTerrain = value
        End Set
    End Property


    '距离选项-------------------------------------------------
    ''' <summary>
    ''' 自动距离
    ''' </summary>
    ''' <remarks></remarks>
    Private m_AutoDistance As String = "Y" '自动距离
    ''' <summary>
    ''' 间断距离
    ''' </summary>
    ''' <remarks></remarks>
    Private m_DiscrDistance As String = "N" '间断距离
    ''' <summary>
    ''' 自动距离
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property AutoDistance() As String
        Get
            Return m_AutoDistance
        End Get
        Set(ByVal value As String)
            m_AutoDistance = value
        End Set
    End Property
    ''' <summary>
    ''' 间断距离
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property DiscrDistance() As String
        Get
            Return m_DiscrDistance
        End Get
        Set(ByVal value As String)
            m_DiscrDistance = value
        End Set
    End Property

    '选项-----------------------------------------------------
    ''' <summary>
    ''' 忿恨
    ''' </summary>
    ''' <remarks></remarks>
    Private m_Fumigation As String = "" '忿恨
    ''' <summary>
    ''' 建筑物下洗
    ''' </summary>
    ''' <remarks></remarks>
    Private m_BuilDown As String = "N" '建筑物下洗
    ''' <summary>
    ''' 忿恨
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property Fumigation() As String
        Get
            Return m_Fumigation
        End Get
        Set(ByVal value As String)
            m_Fumigation = value
        End Set
    End Property
    ''' <summary>
    ''' 建筑物下洗
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property BuilDown() As String
        Get
            Return m_BuilDown
        End Get
        Set(ByVal value As String)
            m_BuilDown = value
        End Set
    End Property

    '简单的地形气象------------------------------------------------
    ''' <summary>
    ''' 气象类型的选择
    ''' </summary>
    ''' <remarks></remarks>
    Private m_MeteOption As Integer = 1 '气象类型的选择
    ''' <summary>
    ''' 稳定类
    ''' </summary>
    ''' <remarks></remarks>
    Private m_StabClass As Integer = 1 '稳定类
    ''' <summary>
    ''' 风速[M/S]
    ''' </summary>
    ''' <remarks></remarks>
    Private m_WindSpeed As Double = 2 '风速[M/S]

    ''' <summary>
    ''' 混合高度
    ''' </summary>
    ''' <remarks></remarks>
    Private m_Mixheigh As String = "N" '混合高度
    ''' <summary>
    ''' 风速计的高度[M]
    ''' </summary>
    ''' <remarks></remarks>
    Private m_Anemheigh As Double = 2 '风速计的高度[M]
    ''' <summary>
    ''' 风速计的高度的选择N/Y
    ''' </summary>
    ''' <remarks></remarks>
    Private m_AmemhighCheck As String = "Y" '风速计的高度的选择N/Y

    ''' <summary>
    ''' 气象类型的选择
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property MeteOption() As Integer
        Get
            Return m_MeteOption
        End Get
        Set(ByVal value As Integer)
            m_MeteOption = value
        End Set
    End Property
    ''' <summary>
    ''' 稳定类
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property StabClass() As Integer
        Get
            Return m_StabClass
        End Get
        Set(ByVal value As Integer)
            m_StabClass = value
        End Set
    End Property
    ''' <summary>
    ''' 风速[M/S]
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property WindSpeed() As Double
        Get
            Return m_WindSpeed
        End Get
        Set(ByVal value As Double)
            m_WindSpeed = value
        End Set
    End Property
    ''' <summary>
    ''' 混合高度
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property Mixheigh() As String
        Get
            Return m_Mixheigh
        End Get
        Set(ByVal value As String)
            m_Mixheigh = value
        End Set
    End Property
    ''' <summary>
    ''' 风速计的高度[M]
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property Anemheigh() As Double
        Get
            Return m_Anemheigh
        End Get
        Set(ByVal value As Double)
            m_Anemheigh = value
        End Set
    End Property

    ''' <summary>
    ''' 风速计的高度的选择N/Y
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property AmemhighCheck() As String
        Get
            Return m_AmemhighCheck
        End Get
        Set(ByVal value As String)
            m_AmemhighCheck = value
        End Set
    End Property
    ''' <summary>
    ''' 简单的地形气象字符串处理
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Function StrMeteorology()
        Dim StrMete As String = ""
        If Me.MeteOption = 1 Then
            StrMete += Me.MeteOption & vbCrLf
        End If
        If Me.MeteOption = 2 Then
            StrMete += Me.MeteOption & vbCrLf & Me.StabClass & vbCrLf
        End If
        If Me.MeteOption = 3 Then
            StrMete += Me.MeteOption & vbCrLf & Me.StabClass & vbCrLf & Me.WindSpeed & vbCrLf
        End If
        Return StrMete
    End Function

    '综合地形选项-----------------------------------------------
    ''' <summary>
    ''' 存储综合地
    ''' </summary>
    ''' <remarks></remarks>
    Private m_ArryComTerrain(1) As CompleTerrain   '存储综合地
    ''' <summary>
    ''' 存储综合地
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property ArryComTerrain() As CompleTerrain()
        Get
            Return m_ArryComTerrain
        End Get
        Set(ByVal value As CompleTerrain())
            m_ArryComTerrain = value
        End Set
    End Property
    ''' <summary>
    ''' 综合地形选项字符串的处理
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Function StrCompleTerrain()
        Dim StrCompleterr As String = ""
        If Me.YNterrain = "Y" Then
            For i As Integer = 0 To Me.ArryComTerrain.Length - 1
                StrCompleterr += Me.ArryComTerrain(i).TerrAbove & " " & Me.ArryComTerrain(i).Dissource & vbCrLf
            Next
            If Me.ComTerrain = "Y" Then
                StrCompleterr += "0.0 0.0" & vbCrLf
            Else
                StrCompleterr += "0.0 0.0" & vbCrLf & Me.YNterrain & vbCrLf
            End If
        End If
        Return StrCompleterr
    End Function

    '自动距离 Automated Distances------------------------------------------
    ''' <summary>
    ''' 最小距离
    ''' </summary>
    ''' <remarks></remarks>
    Private m_MinDistance As Double = 10 '最小距离
    ''' <summary>
    ''' 最大距离
    ''' </summary>
    ''' <remarks></remarks>
    Private m_MaxDistance As Double = 25000 '最大距离
    ''' <summary>
    ''' 自动距离 Automated Distances
    ''' </summary>
    ''' <remarks></remarks>
    Private m_ArryAutoMated(1) As AutoDistance '自动距离 Automated Distances
    ''' <summary>
    ''' 最小距离
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property MinDistance() As Double
        Get
            Return m_MinDistance
        End Get
        Set(ByVal value As Double)
            m_MinDistance = value
        End Set
    End Property
    ''' <summary>
    ''' 最大距离
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property MaxDistance() As Double
        Get
            Return m_MaxDistance
        End Get
        Set(ByVal value As Double)
            m_MaxDistance = value
        End Set
    End Property
    ''' <summary>
    ''' 自动距离 Automated Distances
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property ArryAutoMated() As AutoDistance()
        Get
            Return m_ArryAutoMated
        End Get
        Set(ByVal value As AutoDistance())
            m_ArryAutoMated = value
        End Set
    End Property
    ''' <summary>
    ''' 自动距离字符串的处理
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Function StrAutomatedDistances()
        Dim StrAutoDistances As String = ""
        If Me.AutoDistance = "Y" Then
            If Me.SimpleTerrain = "N" Then
                StrAutoDistances += Me.AutoDistance & vbCrLf & Me.MinDistance & " " & Me.MaxDistance & vbCrLf
            End If
            If Me.SimpleTerrain = "Y" Then
                For i As Integer = 0 To Me.ArryAutoMated.Length - 1
                    StrAutoDistances += Me.AutoDistance & vbCrLf & Me.ArryAutoMated(i).Terrainhigh & vbCrLf & Me.ArryAutoMated(i).MinDistnace & " " & Me.ArryAutoMated(i).MaxDistance & vbCrLf
                Next
                StrAutoDistances += "N" & vbCrLf
            End If
        Else
            StrAutoDistances += Me.AutoDistance & vbCrLf
        End If
        Return StrAutoDistances
    End Function


    '离散距离--------------------------------------------------
    ''' <summary>
    ''' 离散距离1
    ''' </summary>
    ''' <remarks></remarks>
    Private m_ArryDisfrom(1) As Double '离散距离1
    ''' <summary>
    ''' 离散距离2
    ''' </summary>
    ''' <remarks></remarks>
    Private m_ArryDiscr(1) As DiscrDistance '离散距离2
    ''' <summary>
    ''' 离散距离1
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property ArryDisfrom() As Double()
        Get
            Return m_ArryDisfrom
        End Get
        Set(ByVal value As Double())
            m_ArryDisfrom = value
        End Set
    End Property
    ''' <summary>
    ''' 离散距离2
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property ArryDiscr() As DiscrDistance()
        Get
            Return m_ArryDiscr
        End Get
        Set(ByVal value As DiscrDistance())
            m_ArryDiscr = value
        End Set
    End Property
    Public Sub New()
        m_ArryDisfrom(0) = 50
        m_ArryDisfrom(1) = 100

        ReDim m_ArryDiscr(1)
        m_ArryDiscr(0) = New DiscrDistance
        m_ArryDiscr(0).Dissource = 50
        m_ArryDiscr(0).Terrainhigh = 80
        m_ArryDiscr(1) = New DiscrDistance
        m_ArryDiscr(1).Dissource = 100
        m_ArryDiscr(1).Terrainhigh = 90

        ReDim m_ArryComTerrain(1)
        m_ArryComTerrain(0) = New CompleTerrain
        m_ArryComTerrain(0).Dissource = 80
        m_ArryComTerrain(0).TerrAbove = 200
        m_ArryComTerrain(1) = New CompleTerrain
        m_ArryComTerrain(1).Dissource = 90
        m_ArryComTerrain(1).TerrAbove = 300

        ReDim m_ArryAutoMated(1)
        m_ArryAutoMated(0) = New AutoDistance
        m_ArryAutoMated(0).MaxDistance = 30
        m_ArryAutoMated(0).MinDistnace = 20
        m_ArryAutoMated(0).Terrainhigh = 70
        m_ArryAutoMated(1) = New AutoDistance
        m_ArryAutoMated(1).MaxDistance = 40
        m_ArryAutoMated(1).MinDistnace = 30
        m_ArryAutoMated(0).Terrainhigh = 80

    End Sub
    ''' <summary>
    ''' 离散距离字符串的处理
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Function StrDiscrDistance()
        Dim StrDiscrDistan As String = ""
        StrDiscrDistan = Me.DiscrDistance & vbCrLf
        If Me.DiscrDistance = "Y" Then
            If Me.SimpleTerrain = "N" Then
                For i As Integer = 0 To Me.ArryDisfrom.Length - 1
                    StrDiscrDistan += Me.ArryDisfrom(i) & vbCrLf
                Next
                StrDiscrDistan += "0.0" & vbCrLf
            End If
            If Me.SimpleTerrain = "Y" Then
                StrDiscrDistan = ""
                For i As Integer = 0 To Me.ArryDiscr.Length - 1
                    StrDiscrDistan += "Y" & vbCrLf & Me.ArryDiscr(i).Terrainhigh & vbCrLf & Me.ArryDiscr(i).Dissource & vbCrLf & "0.0" & vbCrLf
                Next
                StrDiscrDistan += "N" & vbCrLf
            End If
        End If
        Return StrDiscrDistan
    End Function


    '下洗----------------------------------------------------
    ''' <summary>
    ''' 建筑物高度
    ''' </summary>
    ''' <remarks></remarks>
    Private m_BuilHigh As Double = 9 '建筑物高度
    ''' <summary>
    ''' 地平线的最小值
    ''' </summary>
    ''' <remarks></remarks>
    Private m_MinBuild As Double = 2 '地平线的最小值
    ''' <summary>
    ''' 地平线的最大值
    ''' </summary>
    ''' <remarks></remarks>
    Private m_MaxBuild As Double = 5 '地平线的最大值
    ''' <summary>
    ''' 运算法则
    ''' </summary>
    ''' <remarks></remarks>
    Private m_Algorithm As String = "N" '运算法则
    ''' <summary>
    ''' 运算法则数据A
    ''' </summary>
    ''' <remarks></remarks>
    Private m_Algorithm_A As Double = 656 '运算法则数据A
    ''' <summary>
    ''' 运算法则数据B
    ''' </summary>
    ''' <remarks></remarks>
    Private m_Algorithm_B As Double = 32 '运算法则数据B
    ''' <summary>
    ''' 集中打印
    ''' </summary>
    ''' <remarks></remarks>
    Private m_PrintConce As String '集中打印
    ''' <summary>
    ''' 建筑物高度
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property BuilHigh() As Double
        Get
            Return m_BuilHigh
        End Get
        Set(ByVal value As Double)
            m_BuilHigh = value
        End Set
    End Property
    ''' <summary>
    ''' 地平线的最小值
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property MinBuild() As Double
        Get
            Return m_MinBuild
        End Get
        Set(ByVal value As Double)
            m_MinBuild = value
        End Set
    End Property
    ''' <summary>
    ''' 地平线的最大值
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property MaxBuild() As Double
        Get
            Return m_MaxBuild
        End Get
        Set(ByVal value As Double)
            m_MaxBuild = value
        End Set
    End Property
    ''' <summary>
    ''' 运算法则
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property Algorithm() As String
        Get
            Return m_Algorithm
        End Get
        Set(ByVal value As String)
            m_Algorithm = value
        End Set
    End Property
    ''' <summary>
    ''' 运算法则数据A
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property Algorithm_A() As Double
        Get
            Return m_Algorithm_A
        End Get
        Set(ByVal value As Double)
            m_Algorithm_A = value
        End Set
    End Property
    ''' <summary>
    ''' 运算法则数据B
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property Algorithm_B() As Double
        Get
            Return m_Algorithm_B
        End Get
        Set(ByVal value As Double)
            m_Algorithm_B = value
        End Set
    End Property
    ''' <summary>
    ''' 集中打印
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property PrintConce() As String
        Get
            Return m_PrintConce
        End Get
        Set(ByVal value As String)
            m_PrintConce = value
        End Set
    End Property

    ''' <summary>
    ''' 建筑物下洗字符串处理
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Function BuildWash()
        Dim StrBuildWish As String = ""
        If Me.BuilDown = "Y" Then
            StrBuildWish = Me.BuilHigh & vbCrLf & Me.MinBuild & vbCrLf & Me.MaxBuild & vbCrLf
        End If
        Return StrBuildWish
    End Function

    ''' <summary>
    ''' 建筑物下洗运算规则字符串处理
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Function BuilWashAlgo()
        Dim StrBuilAlgorithm As String = ""
        If Me.BuilDown = "Y" And Me.Algorithm = "Y" Then
            StrBuilAlgorithm = Me.Algorithm & vbCrLf & Me.Algorithm_A & vbCrLf & Me.Algorithm_B & vbCrLf
        End If
        Return StrBuilAlgorithm
    End Function

    '忿恨------------------------------------------------
    ''' <summary>
    ''' 标记：是否可用
    ''' </summary>
    ''' <remarks></remarks>
    ''' 
    Private m_FumEnble As Integer = 0  '标记：是否可用
    ''' <summary>
    ''' 考虑
    ''' </summary>
    ''' <remarks></remarks>
    Private m_FumCalcu As String = "N" '考虑
    ''' <summary>
    ''' 海崖岸线
    ''' </summary>
    ''' <remarks></remarks>
    Private m_Shoreline As String = "N" '海崖岸线
    ''' <summary>
    ''' 短距离海岸线[M]
    ''' </summary>
    ''' <remarks></remarks>
    Private m_ShortShore As Double = 120 '短距离海岸线[M]
    ''' <summary>
    ''' 标记：是否可用
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property FumEnble() As Integer
        Get
            Return m_FumEnble
        End Get
        Set(ByVal value As Integer)
            m_FumEnble = value
        End Set
    End Property
    ''' <summary>
    ''' 海崖岸线
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property Shoreline() As String
        Get
            Return m_Shoreline
        End Get
        Set(ByVal value As String)
            m_Shoreline = value
        End Set
    End Property
    ''' <summary>
    ''' 短距离海岸线[M]
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property ShortShore() As Double
        Get
            Return m_ShortShore
        End Get
        Set(ByVal value As Double)
            m_ShortShore = value
        End Set
    End Property
    ''' <summary>
    ''' 考虑
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property FumCalcu() As String
        Get
            Return m_FumCalcu
        End Get
        Set(ByVal value As String)
            m_FumCalcu = value
        End Set
    End Property
    ''' <summary>
    ''' 忿恨字符串的处理
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Function StFumCalcu()
        Dim StrFrmCalcu As String = ""
        If Me.FumEnble = 1 Then
            StrFrmCalcu += Me.FumCalcu & vbCrLf
            If Me.FumCalcu = "Y" Then
                StrFrmCalcu += Me.Shoreline & vbCrLf
                If Me.Shoreline = "Y" Then
                    StrFrmCalcu += Me.ShortShore.ToString() & vbCrLf
                End If
            End If
        End If
        Return StrFrmCalcu
    End Function
End Class
